import request from "@/utils/request";

//查询所有课程
export const listAll = () =>  request.get('/course/listAll')
//根据id查询课程
export const getCourseById = Id => request.get('/course/getCourseById/' + Id)
//分页查询课程
export const getCourseByPage = (current, size) => request.get('/course/getCourseByPage/' + current + '/' + size)
//新增课程
export const saveNewCourse = formData => request.post('/course/saveNewCourse',formData, {headers: {'Content-Type': 'multipart/form-data'}})
//修改课程信息
export const updateCourseInfo = formData => request.put('/course/updateCourseInfo', formData, {headers: {'Content-Type': 'multipart/form-data'}})
//删除课程
export const removeCourseById = Id => request.put('/course/removeCourseById' + "/" + Id)
